-
Notifications
You must be signed in to change notification settings - Fork 551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uniswap v4 Technical Reference #781
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the file to review / provide feedback on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was just looking at the docs script, lgtm generally
scripts/v4-forge-doc.sh
Outdated
# i.e. /home/user/docs, /home/user/v4-periphery, /home/user/v4-core | ||
|
||
# Copy v4-core | ||
find ../v4-core/docs/src -type f -regex '.*\.sol/[^.]*\.[^.]*\.md' | while read file; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so requires v4-core to be in a sibling repo and updated to latest manually? Would prefer if you handle dep management locally via submodule or something
scripts/v4-forge-doc.sh
Outdated
# Replace relative path links within the file with full paths | ||
sed -i 's|/src/\([^/]\+\)/\([^/]\+\)\.sol/\([^/]\+\)\.\([^/]\+\)\.md|contracts/v4/reference/periphery/\1/\2.md|g' "$new_file" | ||
|
||
echo "Copied: $file -> $new_file" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider deduping code into a helper fn? something like
process_component() {
local component="$1"
local src_dir="../v4-$component/docs/src"
local dest_dir="docs/contracts/v4/reference/$component"
find "$src_dir" -type f -regex '.*\.sol/[^.]*\.[^.]*\.md' | while read -r file; do
1. Runscript runs doc generation nowforge doc
in../v4-core
and../v4-periphery
2. Run
./scripts/v4-forge-doc.sh
forge doc
NOTE:
forge doc will document internal functions too, and is entirely natspec driven